﻿using NewRen.Filters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace NewRen.Controllers
{
    public class SharedController : BaseController
    {
        // GET: Shared
        public ActionResult Index()
        {
            return View();
        }


        // GET: Shared
        public ActionResult Info(string msg)
        {
            ViewBag.Message = msg;
            return View();
        }


        /// <summary>
        /// 关于页面
        /// </summary>
        /// <returns></returns>
        [StaticFileWriteFilter]
        public ActionResult About()
        {
            UseViewEngineStatic("About","", "About");
            return View();
        }

        #region MyRegion
        /// <summary>
        /// 访问受限时跳转
        /// </summary>
        /// <returns></returns>
        public ActionResult AccessDenied()
        {
            return Message("您没有权限执行本操作！");
        }
        #endregion

        #region 帮助
        public ActionResult Help()
        {
            return View();
        }
        #endregion

        public ActionResult Join()
        {
            UseViewEngineStatic("Join", "", "Join");
            return View();
        }

        public ActionResult Contact()
        {
            UseViewEngineStatic("Contact", "", "Contact");
            return View();
        }

        public ActionResult Serviceterm()
        {
            UseViewEngineStatic("Serviceterm", "", "Serviceterm");
            return View();
        }

        public ActionResult Page404()
        {
            ViewBag.Message = "该页面不存在 o(≧口≦)o";
            UseViewEngineStatic("Page404", "", "Page404");
            return View();
        }


        
    }
}